package com.erHuo.entity;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.util.Date;
/**
 * Created by djx on 2017/4/24.
 */

@Entity
@Table(name = "acct_user", catalog = "erhuo")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class AcctUser {

    private static final long serialVersionUID = 6980093847795726310L;
    private String id;
    private String cellphone;   //手机号
    private String verifyCode;  //验证码
    private String deviceId;    //手机设备码
    private String email;       //邮件
//    private String username;    //用户名
    private String password;    //密码
    private String sex;         //性别
    private Integer age;        //年龄
    private String nickName;    //昵称
    private String skillIds;    //兴趣
    private String type;        //用户是否先用微博或微信登陆，（2：代表微博登陆，1：代表微信登陆）
    private String openId;      //微博或微信的openId
    private Date registerTime;  //注册时间


    @Id
    @Column(name = "id", unique = true, nullable = false, length = 36)
    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

//    @Column(name = "user_name" , nullable = true)
//    public String getUserName() {
//        return username;
//    }
//
//    public void setUserName(String username) {
//        this.username = username;
//    }

    @Column(name = "password" , nullable = true)
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name = "nick_name")
    public String getNickName() {
        return this.nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    @Column(name = "e_mail")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Column(name = "cell_phone")
    public String getCellphone() {
        return cellphone;
    }

    public void setCellphone(String cellphone) {
        this.cellphone = cellphone;
    }

    @Column(name = "verify_code")
    public String getVerifyCode() {
        return verifyCode;
    }

    public void setVerifyCode(String verifyCode) {
        this.verifyCode = verifyCode;
    }

    @Column(name = "device_id")
    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    @Column(name = "sex")
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Column(name = "age")
    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Column(name = "skillIds")
    public String getSkillIds() {
        return skillIds;
    }

    public void setSkillIds(String skillIds) {
        this.skillIds = skillIds;
    }

    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Column(name = "openId")
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "register_time", length = 19)
    public Date getRegisterTime() {
        return this.registerTime;
    }

    public void setRegisterTime(Date registerTime) {
        this.registerTime = registerTime;
    }

}


